package com.tuanzi.loan.web.lazy.credit;

import com.tuanzi.loan.business.entity.family.LoanCreditCardInfo;
import com.tuanzi.loan.business.service.family.LoanCreditCardInfoService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.credit.LoanCreditCardInfoRequest;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 10:05 2018/8/31
 * Description:
 */
public class LoanCreditCardInfoLazyDataModel extends BaseLazyDataModel<LoanCreditCardInfoRequest, LoanCreditCardInfo> {
    private static final long serialVersionUID = -4906834727025013326L;

    LoanCreditCardInfoService loanCreditCardInfoService = SpringContextHolder.getBean(LoanCreditCardInfoService.class);

    public LoanCreditCardInfoLazyDataModel(LoanCreditCardInfoRequest loanCreditCardInfoRequest) {
        super(loanCreditCardInfoRequest);
    }

    @Override
    protected Page<LoanCreditCardInfo> doLoad(PageSearcher<LoanCreditCardInfoRequest> pageSearcher) {
        return loanCreditCardInfoService.list(pageSearcher);
    }
}
